<template>
  <view :class="'cuIcon-' + name" :style="{ fontSize: size, color }"
   @click="$emit('event-click')"></view>
</template>

<script>
import { isColor } from "@/utils";
export default {
  name: "cuIcon",
  props: {
    name: {
      type: String,
      default: ""
    },
    size: {
      type: String,
      default: "32upx"
    },
    color: {
      type: String,
      default: "#666666",
      validator(value) {
        return isColor(value);
      }
    }
  },
};
</script>
